<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>密码修改</title>


<style type="text/css">

/* #con {
	position: relative;
	height: 495px;
	border-radius: 4px;
	background:;
}

 #c_con {
	position: absolute;
	width: 500px;
	height: 380px;
	bottom: 60px;
	left: 29%;
	border: 1px #ccc solid; 
	clear: both;
	align-content: center;
	background: ;
	border-radius: 6px;
} 
 */
#btn {
	width: 80px;
	height: 30px;
	border-radius: 4px;
	margin-right: 30px;
	background:#ff3333
}

table tr td{
	font-size:18px;
}
</style>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
	function checkForm() {
		var flag = true;
		if (!checkPassword2())
			flag = false;
		return flag;
	}

	function checkPassword2() {
		if (f1.newPass.value == f1.surePass.value) {
			return true;
		} else {
			alert("两次密码输入不一致，请重新输入！");
			f1.newPass.value = "";
			f1.surePass.value = "";
			return false;
		}
	}
	
</script>

</head>

<body>
	<jsp:include page="nsearch.jsp"></jsp:include>
	
	<div id="con">
		<div id="c_con">
			<form name="f1"
				action="<%=request.getContextPath()%>/user/passwordAlter"
				method="post">
				<table align="center" height="240px">
				<br/><br/>
					<tr >
						<td  align="center" >&nbsp;&nbsp;&nbsp;密码修改</td>
					</tr>
					<br/>
					<tr>
						<td><input type="hidden" name="_method" value="PUT">
						</td>
					</tr>
					<tr>
						<td><input type="hidden" name="id" value=${loginUser.id } /></td>
					</tr>
					<tr >
						<td>账号：</td>
						<td ><input type="text" name="username" 
							value="${loginUser.username }"  readonly="true" /></td>
					</tr>
					<tr>
						<td>旧密码：</td>
						<td><input type="password" name="oldPassword" class="txx"
							id="oldPassword" placeholder="请输入旧密码" required autofocus /></td>
					</tr>
					<tr>
						<td>新密码:</td>
						<td><input type="password" name="newPassword" id="newPass"
							class="txx" placeholder="请输入新密码" required autofocus /></td>
					</tr>
					<tr>
						<td>确认密码:</td>
						<td><input type="password" id="surePass" class="txx"
							placeholder="请再次输入新密码" required autofocus
							onBlur="checkPassword2()" /></td>
					</tr>
					<tr>
						<td><input type="submit" name="Submit" id="btn" value="修改" style="color:#fff"></td>
						<td><input type="reset" name="reset" id="btn" value="重置" style="color:#fff"></td>
					</tr>

				</table>
			</form>
		</div>
	</div>
	
	

</body>
</html>